<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/jsp/admin/includes/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>用户信息</title>
		<%@ include file="/WEB-INF/view/jsp/admin/includes/meta.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx}/admin/css/admin.css" />
		<link href="${ctx}/widgets/extremecomponents/extremecomponents.css"
			type="text/css" rel="stylesheet" />
	</head>
	<body>
		<div class="mask">
			<div class="container">
				<c:choose>
					<c:when test="${not empty user.id}">
						<h3>
							修改用户信息
						</h3>
					</c:when>
					<c:otherwise>
						<h3>
							创建管理员
						</h3>
					</c:otherwise>
				</c:choose>

				<div id="content" class="content">
					<form id="inputForm" action="${ctx}/admin/user!save.do"
						method="post">
						<input type="hidden" name="id" value="${user.id}" />
						<table class="from-table">
							<tr>
								<td class="label" width="10%">
									用户名:
								</td>
								<td>
									<input type="text" name="username" size="40" id="username"
										value="${user.username}" />
								</td>
								<td>
									<div id="usernameTip" style="width: 250px"></div>
								</td>
							</tr>
							<c:if test="${empty user.id}">
								<tr>
									<td class="label" width="10%">
										密 码:
									</td>
									<td>
										<input type="password" name="password" size="40" id="password"
											value="${user.password}" />
									</td>
									<td>
										<div id="passwordTip" style="width: 250px"></div>
									</td>
								</tr>
							</c:if>
							<tr>
								<td class="label">
									昵称:
								</td>
								<td>
									<input type="text" id="nickName" name="nickName" size="40"
										value="${user.nickName}" />
								</td>
								<td>
									<div id="nickNameTip" style="width: 250px"></div>
								</td>
							</tr>
							<tr>
								<td class="label">
									邮箱:
								</td>
								<td>
									<input type="text" id="email" name="email" size="40"
										value="${user.email}" />
								</td>
								<td>
									<div id="emailTip" style="width: 250px"></div>
								</td>
							</tr>
							<tr>
								<td class="label">
								</td>
								<td>
									<input type="submit" class="btn" value="确认" />
									<input type="button" class="btn" value="取消"
										onclick="history.back()" />
								</td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>